home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource Library: Multimedia
/
Resource Library: Multimedia.iso
/
_archive
/
utils
/
graphics
/
convrtrs
/
mac
/
usngsgmg.txt
< prev
next >
Wrap
Internet Message Format
|
1993-06-12
|
14KB
Date: Mon, 31 Aug 92 22:44:20 -0400
From: stewart@shiva.PSU.EDU (Dr. Jon Stewart)
Subject: [*] Using Silicon Graphics images on the Mac, A report
Fellow MacUsers,
A few weeks ago I asked how I could use some of the images I created on the
Silicon Graphics workstation on my Mac. Specifically, I have some pictures of
protein structures that I wanted to pretty up and print out as part of docu-
ments on my Mac. I received three very helpful answers to this question, and
for the benefit of others who might be interested in this problem, I have
collected the methods together (with the authors' kind permission) and
submitted this to the report directory. Many thanks to all who took the time
to reply to my question!
Jon Stewart
Department of Chemistry
Penn State University
stewart@shiva.psu.edu
------------------------------Cut Here----------------------------------------
Bill - I suggest that this go in the report section and be titled
silicon_graphics_to_mac.txt. Thanks very much.
Displaying Figures From a Silicon Graphics Workstation
on the Macintosh
Jon Stewart
Department of Chemistry, Penn State University
stewart@shiva.psu.edu
This is a summary of responses that I received to the following
question: "I use a molecular modeling package (Quanta) on a Silicon
Graphics workstation which produces a PostScript file. I can print this file
on an Apple LaserWriter IINT without any problem. How can I convert
this into a format that I can edit and revise on the Mac, preferably PICT?"
I have combined the three most helpful suggestions that I received below,
and I have am deeply indebted each for his help. I have tried to be as
accurate as possible; however, if you notice errors, please feel free to E-
mail me at the above address. Naturally, all credit goes to the authors; I
am only a grateful scribe :-).
.......................................................................................................................................................
Method #1. Arun Malhotra, malhotra@neptune.cmc.uab.edu
[This method utilizes commands which are only found on a Silicon Graphics
workstation: snapshot, tobw, invert and topict. For more information on
these commands, type man <command> at the UNIX prompt. Basically,
snapshot is like ScreenSnap for the Mac and it produces a color
screendump of whatever was located within the red square. (Note: The
output file for snapshot is always called snap.rgb, so be sure to rename it if
you make more than one snapshot before converting it!) This is converted
to PICT format as follows. -- Jon]
tobw snap.rgb (converts the screen dump to black and white)
invert (makes dark bonds on a white background)
topict (converts the image to PICT format)
The image is downloaded to the Mac and the file type is changed to PICT,
then it can be opened as usual.
[I have not tried this method since the above commands have not yet been
compiled on our machine. However, this method has the distinct
advantage that it does NOT depend on what program you are running on
the Silicon Graphics machine, and so should be a very versatile solution. --
Jon]
A note about the IRIX commands:
The commands tobw, invert, and topict are not a part of the standard Unix,
but are utilities provided as a part of the IRIX operating system. Thus, as
with the snapshot command, you will have to execute these commands
after you exit out of Quanta (or within another unix window).
The tobw, invert, pict, and a lot of other image utilities are provided with
the SGI system as a part of "4Dgifts". These utilities (which also include
source codes in C, as well as notes) will be in the /usr/people/4Dgifts
directory on your SGI workstation. The image utilities are located in the
directory /usr/people/4Dgifts/iristools/imgtools (this has info on
commands and source code in C). The command themselves (the
executable binaries) should be in /usr/sbin. For example, if you cannot
execute tobw at a unix prompt, you may have to give the complete
pathname: /usr/sbin/tobw or add /usr/sbin to your pathlist in the .login
file. If this does not work, perhaps your system has the binaries in some
bin subdirectory in the /usr/people/4Dgifts directory.
.......................................................................................................................................................
Method #2. Alan Hewat, hewat@frill.bitnet
I have had some moderate success with my first attempts at transferring
your SGI-PS file to something that can be edited on the Mac.
[The file in question is a simple stick drawing of a protein consisting of
lines representing bonds on a blank background. -- Jon]
1) Your SG-PS file is simple postscript to moveto (m) and draw a lineto (l).
56.6 343.5 m
74.4 377.0 l
74.4 377.0 m
83.0 373.7 l
etc....
2) You can use a text editor (even teachtext) to copy and paste these m,l
commands into an Adobe Illustrator file that you have saved empty. You
put it between the %AI3_Note: (or %%EndSetup) and %%PageTrailer
statements near the end.
3) Only put the m and l lines in...the other PS commands are not really
necessary, (so far as I can see for the moment). They will not work as
such.
4) You will also need to put in a line containing just "S" immediately
before each "m" line. You can do this with a global edit of a file
containing the m,l commands using eg Edit-II (a shareware app. on Sumex)
or Word or most other text editors. There is probably a way of avoiding
this start of drawing "S" command, but I don't know how for the moment.
5) You should then be able to re-open the file with Illustrator and edit the
individual bonds. Illustrator is a great program, and not difficult to learn.
6) Alternatively, if you do all the above but use the PREVIOUS version of
Illustrator called "88" (the latest version is 3.2), then you can also open
the Illustrator-88 file in Canvas. You can edit it in Canvas and even save
it as PICT, and I have included various Canvas files with different formats
including PICT, which you can view even with TeachText (system-7
version). I don't know about MacDraw, but it should work too.
HOWEVER. IMHO no drawing program is as good as Illustrator, so why go
to this extra trouble. As well, the files produced by Canvas are very large,
and succeed in bombing TeachText.
7) My files so far produce drawings that seem to contain SECTIONS of the
molecular structure. I must have something not quite right, and will look
at it again over the w/e. But it works "en principe" as we say in France.
The problem is that (good as it is) Illustrator is very finicky about what
it will accept as PS, and of course I have no doc. on that. I am complaining
to Adobe. They should allow it to open ordinary PS files such as yours
without all this trouble.
Best wishes, Alan.
.......................................................................................................................................................
Method #3. Andy Sheppard, mbasd@dlvh.daresbury.ac.uk
[This method is for users of the molecular modeling package Sybyl. I have
included it because I think the general approach might be helpful to
others. -- Jon]
I just saw your posting to Info-Mac re: SGI->MacPICT conversion. While
not being an exact answer to your question, you might get some help
from the following posting I recently sent to the Sybyl Bulletin Board.
I too had been frustrated about postscript transfer from Unix (an E&S
ESV in my case) to Mac - my solution is described below: I see no reason
why this should not also work on a SG machine. However you may then
have a problem in reading your PICT file into MacDraw II - MacDraw II
has a bad habit of losing ALL colour information. A better solution is to use
a painting program such as Illustrator, Canvas or MacCheese.
Some of other information you need is that your Mac must have a
reasonable amount of disk space and preferably >8 MB RAM. I would hope
that you could expand your SE to that amount of RAM fairly cheaply or
borrow a colleague's Mac II.
Although initially you need a lot of disk space, after translation to
PICT format a 1.5MB ESV file will compress to about 100-300K (depending
on the amount of detail in the picture) and even further to 10-30K
using JPEGview/QuickTime compression!
Please let me know how you get on, as I'm sure this would be useful
to other users!
Regards,
Andy Sheppard
Transfer to Macintosh is essential due to the dearth of such programs
for the ESV, on which I run Sybyl. There may also be a similar lack of
programs for the Iris and other Unix platforms on which Sybyl will run
- I don't really know. Anyway, I'm sure the majority of users would
prefer to use a Mac rather than a Unix box! Below I have outlined a
route which I have perfected (?) to transfer an image from the ESV to
Mac PICT format, which is the standard Mac Picture format, readable by
all major Mac graphics applications (of course Nitro will output a PICT
file).
This still relies on third-party software but is the best I can do. This
method is relatively painless and inexpensive, although a Mac II with at
least 8MB RAM and >2MB hard disk space is necessary.
Requirements:
------------
ESV side: Sybyl (of course)
------------xwd (part of the standard X release for the ESV -
produces a dump file of any X window)
kermit (or other method of transferring a binary file
to the Mac from the ESV)
Mac side: Mac II class Macintosh (I use MacIIcx, 8-bit colour,
------------8MB RAM, hard disk)
kermit, VersaTerm PRO...(or other terminal emulator)
Imagery v1.8 (see below)
32-bit painting program (e.g. MacCheese, costs about
$100, or a more expensive program such as
Photoshop, Studio 32 etc.)
Procedure:
-------------
1. In Sybyl on the ESV, get your image on the screen, press F6 to
remove the tool-palette icons. Resize the picture window to
640x480 pixels: this is a good Mac size. Scale the image to
fit the window [N.B. you may get some harmless PEX error messages
while doing this part].
2. At the "Sybyl>" prompt, type "dcl xwd -out name.xwd" <enter>
where "name" is the name for your picture. The cursor will change
from an arrow to a "+". Click inside the window containing your
picture. The bell will sound: after a few seconds it will sound
again indicating the file has been written to disk. For a 640x480
pixel window, the file will be about 1.25MB in size (:-O).
3. Logon to the ESV from the Mac using Kermit/VT PRO and
RS232/Ethernet connection. When logged in, procedure for file
transfer to the Mac is:
% kermit <enter>
C-kermit> set file type binary <enter>
C-kermit> send name.xwd <enter>
(then do whatever is necessary to start file transfer to Mac using the
terminal emulator - make sure you have enough hard disk space!)
C-kermit> exit <enter>
% exit <enter>
4. Quit from the terminal emulator, start up Imagery v1.8. Imagery
is an EXTREMELY useful program for translating many graphics file
formats (Sun raster files, IBM files etc.) to Mac format. Imagery is public
domain, written by Jeff Lewis (76217.2241@COM.COMPUSERVE) and
available on many bulletin boards and archives. The "memory size" in the
Imagery "Get Info" box should be set to 5000K to handle the large file.
Versions earlier than 1.8 do not work for ESV files.
5. Select PICT2 output. Open up the xwd file: the filename MUST have
".xwd" on the end so that Imagery knows to translate an X window dump
file. Type the output filename for the PICT file. When translation is
complete, the output file will have been reduced to between about 30-
300K depending on the amount of detail in the original: trash the ".xwd"
file to free up disk space.
6. Open up the PICT file in MacCheese (or whatever) in "32-bit true
colour" mode (again the memory partition for MacCheese etc. should be
about 5000K at this stage). The image should be displayed - remarkably
little loss in resolution, depth cueing or colour compared to the original ESV
image should be observed.
7. Retouch the image in your painting program as required - the image
will be on a black background but this can easily be changed [N.B. it would
be nice to have a white Sybyl background instead of just a black one
sometimes*] - then print, integrate into a report, QuickTime movie, etc.....
I hope you can see that this is a very inexpensive and effective way of
producing good pictures from Sybyl and perhaps other users would like to
try it too.
etc.........
* A way to get a white background is:
1. edit file $TA_ROOT/lib/X11/1280x1024/Sybyl
2. change line
sybyl*portBackground black
to:
sybyl*portBackground white
--------------------------------------------
.......................................................................................................................................................
So which method will work best for you? It depends. If you want full
color images and don't care too much about size, then methods 1 or 3 look
best. If you images are a relatively small number of lines on a blank
background and you need to edit the individual lines, then try to make
method 2 work.
One other method that wasn't mentioned but which might be useful is to
save your output in Hewlet-Packard 7450 plotter output files. There is a
Hypercard stack at Sumex-aim called HP2PICT which is supposed to do
simple conversions between these formats. In addition, the documentation
for Imagery 1.8 says that the next version of this program will also handle
this conversion.
Many thanks to Arun, Alan and Andy for all of their time and effort, and
all compliments should certainly be directed to them.